<!-- $Id: goods_info.htm 17126 2010-04-23 10:30:26Z liuhui $ -->
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js"}
{insert_scripts files="../js/region.js"}
<div class="tab-div">
      <form enctype="multipart/form-data" action="" method="post" name="theForm" onSubmit="return validate();">

        <table width="100%" id="general-table" align="center">
          <tr>
            <td class="label">店铺名称</td>
            <td><input type="text" name="shop_name" value="{$point.shop_name|escape}" size="30" />&nbsp;
            {$lang.require_field}
            </td>
          </tr>
          <tr>
            <td class="label">选择省份</td>
            <td>
		        <select name="province" id="selProvinces" onChange="region.changed(this, 2, 'selCities')" style="border:1px solid #ccc;">
			        <option value="0">请选择省份</option>
			        <!-- {foreach from=$province_list item=province} -->
			        <option value="{$province.region_id}" {if $point.province eq $province.region_id}selected{/if}>{$province.region_name}</option>
			        <!-- {/foreach} -->
		      	</select>
               {$lang.require_field}
            </td>
          </tr>
          <tr>
            <td class="label">选择城市</td>
            <td>
		        <select name="city" id="selCities" onChange="region.changed(this, 3, 'selDistricts')" style="border:1px solid #ccc;">
			        <option value="0">请选择城市</option>
			        <!-- {foreach from=$city_list item=city} -->
			        <option value="{$city.region_id}" {if $point.city eq $city.region_id}selected{/if}>{$city.region_name}</option>
			        <!-- {/foreach} -->
			   </select>
               {$lang.require_field}
            </td>
          </tr>
          <tr>
            <td class="label">选择区域</td>
            <td>
		        <select name="district" id="selDistricts"  style="border:1px solid #ccc;">
			        <option value="0">请选择区域</option>
			        <!-- {foreach from=$district_list item=district} -->
			        <option value="{$district.region_id}" {if $point.district eq $district.region_id}selected{/if}>{$district.region_name}</option>
			        <!-- {/foreach} -->  
		        </select> 
               {$lang.require_field}
            </td>
          </tr>
          <tr>
            <td class="label">地址</td>
            <td><input type="text" name="address" value="{$point.address|escape}" size="30" />&nbsp;
            {$lang.require_field}
            </td>
          </tr>
          <tr>
            <td class="label">坐标</td>
            <td><input type="text" name="address2" value="{$point.address|escape}" size="50" /><a href="http://lbs.qq.com/tool/getpoint/index.html" target="_blank">获取坐标</a></td>
          </tr>
           <tr>
            <td class="label">联系电话</td>
            <td><input type="text" name="mobile" value="{$point.mobile}" size="30" />&nbsp;
        
            </td>
          </tr>
          <tr>
            <td class="label">开启打印机</td>
            <td>
            <input type="radio" name="has_printer" value="1" {if $point.has_printer eq 1}checked{/if}/>&nbsp;是
            <input type="radio" name="has_printer" value="0" {if $point.has_printer neq 1}checked{/if}/>&nbsp; 否
        
            </td>
          </tr>
          <tr>
            <td class="label">打印机</td>
            <td>
            <input type="radio" name="printer_type" value="feyin" {if $point.printer_type eq 'feyin'}checked{/if}/>&nbsp;飞印
            </td>
          </tr>
          <tr>
            <td class="label">打印机终端编码</td>
            <td>
            <input type="text" name="device_no" value="{$point.device_no}" size="60" />&nbsp;
            </td>
          </tr>
          <tr>
            <td class="label">打印机商户代码</td>
            <td>
            <input name="device_code" type="text" id="device_code" value="{$point.device_code}" size="60" />&nbsp;登录飞印后在“API集成”->“获取API集成信息”获取
            </td>
          </tr> 
          <tr>
            <td class="label">打印机密钥</td>
            <td>
            <input type="text" name="device_key" value="{$point.device_key}" size="60" />&nbsp;同上
            </td>
          </tr>         
        </table>


        <div class="button-div">
          <input type="hidden" name="id" value="{$point.id}" />
          <input type="submit" value="{$lang.button_submit}" class="button"  />
          <input type="reset" value="{$lang.button_reset}" class="button" />
        </div>
        <input type="hidden" name="act" value="{$form_act}" />
      </form>
    </div>
{insert_scripts files="validator.js,tab.js"}
<script language="JavaScript">
region.isAdmin=true;

function validate()
{
    var validator = new Validator('theForm');
    var shop_name  = document.forms['theForm'].elements['shop_name'].value;
    var province  = document.forms['theForm'].elements['province'].value;
    var city  = document.forms['theForm'].elements['city'].value;
    var district  = document.forms['theForm'].elements['district'].value;
    var address  = document.forms['theForm'].elements['address'].value;
    
    
    validator.required('shop_name', '店铺名称不能为空');
    validator.required('province', '省份不能为空');
    validator.required('city', '城市不能为空');
    validator.required('district', '区域不能为空');
    validator.required('address', '地址不能为空');

    return validator.passed();
  
}
</script>
{include file="pagefooter.htm"}
